{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 插入 HTML 视频\n",
    "- 在命令行执行 jupyter-lab\n",
    "- 然后 打开 浏览器，加载 html_video.ipynb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>本地视频</div>\n",
       "<video width=\"320\" height=\"240\" controls>\n",
       "  <source src=\"banma.mp4\" type=\"video/mp4\">\n",
       "</video>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%HTML\n",
    "<div>本地视频</div>\n",
    "<video width=\"320\" height=\"240\" controls>\n",
    "  <source src=\"banma.mp4\" type=\"video/mp4\">\n",
    "</video>\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<iframe  width=\"100%\" height=\"500\"  src=\"//player.bilibili.com/player.html?aid=625016090&bvid=BV1at4y1m7VX&cid=173067736&page=1\" scrolling=\"no\" border=\"0\" frameborder=\"no\" framespacing=\"0\" allowfullscreen=\"true\"> </iframe>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%HTML\n",
    "<div>B站视频</div>\n",
    "<iframe  width=\"100%\" height=\"500\"  src=\"//player.bilibili.com/player.html?aid=625016090&bvid=BV1at4y1m7VX&cid=173067736&page=1\" scrolling=\"no\" border=\"0\" frameborder=\"no\" framespacing=\"0\" allowfullscreen=\"true\"> </iframe>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<video class=\"\" autoplay=\"\" tabindex=\"2\" mediatype=\"video\" src=\"blob:https://www.ixigua.com/5f9b5f44-7140-46d6-a35b-62799ffac161\" style=\"position: absolute; top: 0px; left: 0px;\"></video>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%HTML\n",
    "<div>西瓜视频，不支持</div>\n",
    "<video class=\"\" autoplay=\"\" tabindex=\"2\" mediatype=\"video\" src=\"blob:https://www.ixigua.com/5f9b5f44-7140-46d6-a35b-62799ffac161\" style=\"position: absolute; top: 0px; left: 0px;\"></video>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>腾讯视频</div>\n",
       "<iframe width=\"100%\" height=\"500\"  frameborder=\"0\" src=\"https://v.qq.com/txp/iframe/player.html?vid=g0942dvc5wb\" allowFullScreen=\"true\"></iframe>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%HTML\n",
    "<div>腾讯视频，有广告</div>\n",
    "<iframe width=\"100%\" height=\"500\"  frameborder=\"0\" src=\"https://v.qq.com/txp/iframe/player.html?vid=g0942dvc5wb\" allowFullScreen=\"true\"></iframe>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>优酷视频，可以。站外播放，没有广告？</div>\n",
       "\n",
       "<iframe width=\"100%\" height=\"500\"  src='https://player.youku.com/embed/XNDQyNTk0NTg0MA==' frameborder=0 'allowfullscreen'></iframe>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%HTML\n",
    "<div>优酷视频，可以。站外播放，没有广告？</div>\n",
    "\n",
    "<iframe width=\"100%\" height=\"500\"  src='https://player.youku.com/embed/XNDQyNTk0NTg0MA==' frameborder=0 'allowfullscreen'></iframe>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
